//分辨账户是否为 手机 邮箱 用户名
export let userClassify = (name)=>{
  let opt = {
    type:"username"
  };
  let judgeRules = [
    {reg:/^1\d{10}$/, type:'mobile'},
    {reg:/@/g, type:'email'}
  ];
  judgeRules.forEach(rule =>{
    if(rule.reg.test(name)) {
      return opt = rule;
    }
  });
  return opt
};